<template>
    <div>
        <el-form-item label="最大值">
            <el-input-number v-model="activeData.max" :min="1" placeholder="最大值" />
        </el-form-item>
        <el-form-item
            v-if="activeData['allow-half'] !== undefined"
            label="允许半选"
        >
            <el-switch v-model="activeData['allow-half']" />
        </el-form-item>
        <el-form-item
            v-if="activeData['show-text'] !== undefined"
            label="辅助文字"
        >
            <el-switch
                v-model="activeData['show-text']"
                @change="rateTextChange"
            />
        </el-form-item>
        <el-form-item
            v-if="activeData['show-score'] !== undefined"
            label="显示分数"
        >
            <el-switch
                v-model="activeData['show-score']"
                @change="rateScoreChange"
            />
        </el-form-item>
        <el-form-item
            v-if="activeData['show-stops'] !== undefined"
            label="显示间断点"
        >
            <el-switch v-model="activeData['show-stops']" />
        </el-form-item>
    </div>
</template>

<script>
export default {
    name: 'ConfigItemRate',
    props: ['activeData'],
    methods: {
        rateTextChange(val) {
            if (val) this.activeData['show-score'] = false
        },
        rateScoreChange(val) {
            if (val) this.activeData['show-text'] = false
        }

    }
}
</script>

<style scoped>

</style>
